package com.ycdx.zwzc.action;

import java.util.List;

import org.apache.struts2.json.annotations.JSON;

import com.opensymphony.xwork2.ActionSupport;
import com.ycdx.zwzc.impl.SymptomImpl;
import com.ycdx.zwzc.pojo.Symptom;

public class GetSymptomAction extends ActionSupport {

	private static final long serialVersionUID = -3439467506045553418L;
	
	private List<Symptom> list;
	private String type;
	

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	@JSON(name="list")
     public List<Symptom> getList() {
        return list;
     }

    public String ajaxGetComName(){
    	//System.out.println(typeId);
	    try{
	        list = SymptomImpl.querySymptomByType(type);
	    }catch(Exception e){
	        e.printStackTrace();
	    }
	    return SUCCESS;
    }
}
